-- note: all comment lines must end with a semi-colon or parsing will fail;
-- purpose of update: Removing printing from the accordion;
-- update created by: Class Builder {$smarty.now|date_format};

-- IMPORTANT!  REPLACE THE VERSION NUMBER AT THE BOTTOM OF THIS SCRIPT!;

{foreach from=$tableInfos item=tableInfo}
DROP TABLE IF EXISTS '{$tableInfo.table->Name}';
CREATE TABLE  '{$tableInfo.table->Name}' (
{assign var=columns value=$tableInfo.table->Columns}
{assign var=delim value=' '}
{foreach from=$columns item=column}
{$delim}'{$column->Name}' {$column->GetSqliteType()} {if $column->Null}{else}NOT NULL{/if}{if $column->Default} DEFAULT '{$column->Default}'{/if}

{assign var=delim value=','}
{/foreach}
{$delim}PRIMARY KEY ('{$tableInfo.table->GetPrimaryKeyName(false)}')
{foreach from=$tableInfo.table->Constraints item=constraint}
{$delim}CONSTRAINT '{$constraint->Name}' FOREIGN KEY ('{$constraint->KeyColumn}') REFERENCES '{$constraint->ReferenceTableName}'('{$constraint->ReferenceKeyColumn}')
{/foreach}
);

{/foreach}

-- ##### DEFAULT APPLICATION DATA BELOW: ##### --;

insert into system values ('sync_server','http://localhost/mtdserv/');
insert into system values ('username','');
insert into system values ('sync_automatically','true');
insert into system values ('default_nav','Tour');
insert into system values ('selection_cache','{ldelim}{rdelim}');

 -- #####account #####  --;
 
INSERT INTO 'account' ('a_id','a_username','a_password','a_first_name','a_middle_name','a_last_name','a_nickname','a_preferred_name','a_notes','a_created_date','a_created_by','a_modified_date','a_modified_by','a_sync_id','a_sync_date','a_sync_checksum','a_is_deleted') VALUES 
 ('0','system','','System','','Account','No Account Selected','No Account Selected','Default account required by system',STRFTIME('%J','2009-01-01 01:01:01'),'0',STRFTIME('%J','2009-01-01 01:01:01'),'0',0,STRFTIME('%J','2009-01-01 01:01:01'),'',0);

 -- ##### organization #####  --;
 
INSERT INTO 'organization' ('o_id','o_name','o_notes','o_created_date','o_created_by','o_modified_date','o_modified_by','o_sync_id','o_sync_date','o_sync_checksum','o_is_deleted') VALUES 
 ('0','No Organization Selected','Default organization required by system',STRFTIME('%J','2009-01-01 01:01:01'),'0',STRFTIME('%J','2009-01-01 01:01:01'),'0',0,STRFTIME('%J','2009-01-01 01:01:01'),'',0);

 -- ##### artist #####  --;
 
INSERT INTO 'artist' ('ar_id','ar_organization_id','ar_name','ar_contact_email','ar_checks_payable_to','ar_federal_tax_id','ar_wire_information','ar_notes','ar_graphics_xml','ar_i18n_prefs_xml','ar_pass_types_xml','ar_created_date','ar_created_by','ar_modified_date','ar_modified_by','ar_sync_id','ar_sync_date','ar_sync_checksum','ar_is_deleted') VALUES 
 ('0','0','No Artist Selected','support@pcguild.com','','','','Default artist required by system','','','',STRFTIME('%J','2009-01-01 01:01:01'),'0',STRFTIME('%J','2009-01-01 01:01:01'),'0',0,STRFTIME('%J','2009-01-01 01:01:01'),'',0);

 -- ##### tour #####  --;
 
INSERT INTO 'tour' ('t_id','t_artist_id','t_is_active','t_tour_name','t_leg_name','t_notes','t_graphics_xml','t_equipment_manifest_xml','t_created_date','t_created_by','t_modified_date','t_modified_by','t_sync_id','t_sync_date','t_sync_checksum','t_is_deleted') VALUES 
 ('0','0',0,'No Tour Selected','No Leg Selected','Default tour required by system','','',STRFTIME('%J','2009-01-01 01:01:01'),'0',STRFTIME('%J','2009-01-01 01:01:01'),'0',0,STRFTIME('%J','2009-01-01 01:01:01'),'',0);

 -- ##### company_type #####  --;
 
insert into company_type values (
  'Business',
  'General Business',
  '<mx:MXML xmlns:mx="http://www.adobe.com/2006/mxml"><mx:Label text="Sample Field" x="0" y="0" /><mx:TextInput id="sampleField" name="sampleField" text="" x="80" y="0" /></mx:MXML>',
  STRFTIME('%J','2009-01-01 01:01:01'), '0', STRFTIME('%J','2009-01-01 01:01:01'), '0', '0', STRFTIME('%J','2009-01-01 01:01:01'), '', 0);

insert into company_type values (
  'Promoter',
  'Promoter, Label, Producer',
  '<mx:MXML xmlns:mx="http://www.adobe.com/2006/mxml"><mx:Label text="Sample Field" x="0" y="0" /><mx:TextInput id="sampleField" name="sampleField" text="" x="80" y="0" /></mx:MXML>',
  STRFTIME('%J','2009-01-01 01:01:01'), '0', STRFTIME('%J','2009-01-01 01:01:01'), '0', '0', STRFTIME('%J','2009-01-01 01:01:01'), '', 0);
  
insert into company_type values (
  'Catering',
  'Hospitality and Catering',
  '<mx:MXML xmlns:mx="http://www.adobe.com/2006/mxml"><mx:Label text="Sample Field" x="0" y="0" /><mx:TextInput id="sampleField" name="sampleField" text="" x="80" y="0" /></mx:MXML>',
  STRFTIME('%J','2009-01-01 01:01:01'), '0', STRFTIME('%J','2009-01-01 01:01:01'), '0', '0', STRFTIME('%J','2009-01-01 01:01:01'), '', 0);
 
insert into company_type values (
  'Production',
  'Production and Equipment',
  '<mx:MXML xmlns:mx="http://www.adobe.com/2006/mxml"><mx:Label text="Sample Field" x="0" y="0" /><mx:TextInput id="sampleField" name="sampleField" text="" x="80" y="0" /></mx:MXML>',
  STRFTIME('%J','2009-01-01 01:01:01'), '0', STRFTIME('%J','2009-01-01 01:01:01'), '0', '0', STRFTIME('%J','2009-01-01 01:01:01'), '', 0);

-- ##### company #####  --;

INSERT INTO 'company' ('co_id','co_mtn_id','co_organization_id','co_company_type_id','co_parent_company_id','co_is_linked','co_name','co_address_line_1','co_address_line_2','co_city','co_state','co_zip','co_country','co_lat_long','co_google_map_query','co_time_zone','co_notes','co_custom_fields_xml','co_created_date','co_created_by','co_modified_date','co_modified_by','co_sync_id','co_sync_date','co_sync_checksum','co_is_deleted') VALUES 
 ('0','0','0','Business','0',0,'No Company Selected','','','','','','','','','','Default company required by system','',STRFTIME('%J','2009-01-01 01:01:01'),'0',STRFTIME('%J','2009-01-01 01:01:01'),'0',0,STRFTIME('%J','2009-01-01 01:01:01'),'',0);

-- ##### contact #####  --;

INSERT INTO 'contact' ('c_id','c_parent_contact_id','c_mtn_id','c_account_id','c_organization_id','c_first_name','c_middle_name','c_last_name','c_nick_name','c_gender','c_preferred_name','c_company_name','c_company_title','c_comapny_department','c_address_line_1','c_address_line_2','c_address_city','c_address_state','c_address_zip','c_address_country','c_phone_xml','c_email_xml','c_social_network_xml','c_notes','c_birth_date','c_marital_status','c_spouse_name','c_anniversary_date','c_spouse_birth_date','c_children_names','c_fathers_name','c_mothers_name','c_family_notes','c_emergency_contact_name','c_emergency_contact_relationship','c_emergency_contact_phone','c_diet_restrictions','c_diet_allergies','c_place_of_birth','c_driver_license_number','c_driver_license_state','c_social_security_number','c_local_taxation_number','c_passport_xml','c_travel_preferences_xml','c_bank_account_xml','c_credit_card_xml','c_misc_data','c_created_date','c_created_by','c_modified_date','c_modified_by','c_sync_id','c_sync_date','c_sync_checksum','c_is_deleted') VALUES 
 ('0','0','0','0','0','Default','','Contact','No Contact Selected','Male','No Contact Selected','','','','','','','','','','','','','Default contact required by system','2008-01-01 01:01:01','','','2008-01-01 01:01:01','2008-01-01 01:01:01','','','','','','','','','','','','','','','','','','','','2008-01-01 01:01:01','0','2008-01-01 01:01:01','0',0,'2008-01-01 01:01:01','',0);

-- ##### venue_type #####  --;

insert into venue_type values (
  'Arena',
  'Arena, stadium or other large venue',
  '<?xml version="1.0" encoding="utf-8"?><mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:genui="com.pcguild.genui.containers.*" width="100%"xmlns:components="com.pcguild.genui.components.*"><mx:Label text="stage" x="0" y="0" textAlign="right" styleName="mediumAndBold"/><mx:Label text="stage wings" width="80" x="0" y="23" textAlign="right" styleName="smallLabel"/><mx:TextInput id="stageWings" name="stageWings" width="250" x="90" y="23" styleName="regularInput"/><mx:Label text="pa bays" width="80" x="0" y="43" textAlign="right" styleName="smallLabel"/><mx:TextInput id="prod_pa_bays" name="paBays" width="250" x="90" y="43" styleName="regularInput"/><mx:Label text="orchestra pit" width="80" x="0" y="63" textAlign="right" styleName="smallLabel"/><mx:TextInput id="prod_orchestra_pit" name="orchestraPit" width="250" x="90" y="63" styleName="regularInput"/><mx:Label text="curtain" width="80" x="0" y="83" textAlign="right" styleName="smallLabel"/><mx:TextInput id="prod_curtain" name="curtain" width="250" x="90" y="83" styleName="regularInput"/><mx:Label text="fire curtain" width="80" x="0" y="103" textAlign="right" styleName="smallLabel"/><mx:TextInput id="prod_fire_curtain" name="fireCurtain" width="250" x="90" y="103" styleName="regularInput"/><mx:Label text="steps" width="80" x="0" y="123" textAlign="right" styleName="smallLabel"/><mx:TextInput id="prod_steps" name="steps" width="250" x="90" y="123" styleName="regularInput"/><mx:Label text="trim height" width="80" x="0" y="143" textAlign="right" styleName="smallLabel"/><mx:TextInput id="prod_trim_height" name="trimHeight" width="250" x="90" y="143" styleName="regularInput"/><mx:Label text="stage notes" width="80" x="0" y="163" textAlign="right" styleName="smallLabel"/><mx:TextInput id="notes_stage" name="stage" height="50" y="163" left="90" right="10" styleName="regularInput"/><mx:Label text="deck to grid" width="80" x="350" y="23" textAlign="right" styleName="smallLabel"/><mx:TextInput id="prod_deck_to_grid" name="deckToGrid" y="23" left="430" right="10" styleName="regularInput"/><mx:Label text="legs" width="80" x="350" y="43" textAlign="right" styleName="smallLabel"/><mx:TextInput id="prod_legs" name="legs" y="43" left="430" right="10" styleName="regularInput"/><mx:Label text="borders" width="80" x="350" y="63" textAlign="right" styleName="smallLabel"/><mx:TextInput id="prod_borders" name="borders" y="63" left="430" right="10" styleName="regularInput"/><mx:Label text="dimensions" width="80" x="430" y="110" styleName="smallLabel"/><mx:Label text="W" width="15" x="428" y="132" styleName="smallLabel"/><mx:TextInput id="prod_dimensions_W" name="dimensionsW" width="25" x="445" y="130" styleName="regularInput"/><mx:Label text="H" width="13" x="478" y="132" styleName="smallLabel"/><mx:TextInput id="prod_dimensions_H" name="dimensionsH" width="25" x="495" y="130" styleName="regularInput"/><mx:Label text="D" width="12" x="530" y="132" styleName="smallLabel"/><mx:TextInput id="prod_dimensions_D" name="dimensionsD" width="25" x="545" y="130" styleName="regularInput"/><mx:Label text="proscenium" width="80" x="610" y="110" styleName="smallLabel"/><mx:Label text="W" width="22" x="607" y="132" height="22" styleName="smallLabel"/><mx:TextInput id="prod_proscenium_W" name="prosceniumW" width="25" x="625" y="130" styleName="regularInput"/><mx:Label text="H" width="13" x="658" y="132" styleName="smallLabel"/><mx:TextInput id="prod_proscenium_H" name="prosceniumH" width="25" x="675" y="130" styleName="regularInput"/><mx:Label text="loading" x="0" y="220" styleName="mediumAndBold"/><mx:Label text="access" width="80" x="0" y="240"textAlign="right" styleName="smallLabel"/><mx:TextInput id="prod_access" y="240" name="access" left="90" right="10" styleName="regularInput"/><mx:Label text="dock type" width="80" x="0" y="260"textAlign="right" styleName="smallLabel"/><mx:TextInput id="prod_dock_type" y="260" name="dockType" left="90" right="10" styleName="regularInput"/><mx:Label text="dead case" width="80" x="0" y="280"textAlign="right" styleName="smallLabel"/><mx:TextInput id="prod_dead_case" y="280" name="deadCase" left="90" right="10" styleName="regularInput"/><mx:Label text="fork lift(s)" width="80" x="0" y="300"textAlign="right" ' ||
     'styleName="smallLabel"/><mx:TextInput id="prod_forklifts" y="300" name="forklifts" left="90" right="10" styleName="regularInput"/><mx:Label text="comments" width="80" x="0" y="320" height="20"textAlign="right" styleName="smallLabel"/><mx:TextInput id="notes_load_in_out_comments" name="loadComments" y="320"height="50" left="90" right="10" styleName="regularInput"/><mx:Label text="rigging" x="0" y="378" styleName="mediumAndBold"/><mx:Label text="fly system" width="80" x="0" y="400" textAlign="right" styleName="smallLabel"/><mx:TextInput id="prod_fly_system" name="flySystem" y="400" left="90" right="10" styleName="regularInput"/><mx:Label text="line sets" width="80" x="0" y="420" textAlign="right" styleName="smallLabel"/><mx:TextInput id="prod_line_sets" name="lineSets" y="420" left="90" right="10" styleName="regularInput"/><mx:Label text="comments" width="80" x="0" y="440" textAlign="right" styleName="smallLabel"/><mx:TextInput id="notes_rigging_comments" name="riggingComments" y="440" height="50" left="90" right="10" styleName="regularInput"/><mx:Label text="power" x="0" y="500" styleName="mediumAndBold"/><mx:Label text="audio power" width="90" x="0" y="520" textAlign="right" styleName="smallLabel"/><mx:TextInput id="prod_audio_power" name="audioPower" y="520" left="90" right="10" styleName="regularInput"/><mx:Label text="lighting power" width="90" x="0" y="540" textAlign="right" styleName="smallLabel"/><mx:TextInput id="prod_lighting_power" name="lightingPower" y="540" left="90" right="10" styleName="regularInput"/><mx:Label text="other power" width="90" x="0" y="560" textAlign="right" styleName="smallLabel"/><mx:TextInput id="prod_other_power" name="otherPower" y="560" left="90" right="10" styleName="regularInput"/><mx:Label text="shore power" width="90" x="0" y="580" textAlign="right" styleName="smallLabel"/><mx:TextInput id="prod_shore_power" name="shorePower" y="580" left="90" right="10" styleName="regularInput"/><mx:Label text="dist to stage" width="90" x="0" y="600" textAlign="right" styleName="smallLabel"/><mx:TextInput id="prod_dist_to_stage" name="distToStage" y="600" left="90" right="10" styleName="regularInput"/><mx:Label text="comments" width="90" x="0" y="620" textAlign="right" styleName="smallLabel"/><mx:TextInput id="notes_power_comments" name="powerComments" y="620" height="50" left="90" right="10" styleName="regularInput"/><mx:Label text="show" x="0" y="680" styleName="mediumAndBold"/><mx:Label text="house lights" width="90" x="0" y="700" textAlign="right" fontStyle="normal" styleName="smallLabel"/><mx:TextInput id="prod_house_lights" name="houseLights" y="700" left="90" right="10" styleName="regularInput"/><mx:Label text="climate control" width="90" x="0" y="720" textAlign="right" fontStyle="normal" styleName="smallLabel"/><mx:TextInput id="prod_climate_control" name="climateControl" y="720" left="90" right="10" styleName="regularInput"/><mx:Label text="fog" width="90" x="0" y="740" textAlign="right" fontStyle="normal" styleName="smallLabel"/><mx:TextInput id="prod_fog" y="740" name="fog" left="90" right="10" styleName="regularInput"/><mx:Label text="pyro" width="90" x="0" y="760" textAlign="right" fontStyle="normal" styleName="smallLabel"/><mx:TextInput id="prod_pyro" y="760" name="pyro" left="90" right="10" styleName="regularInput"/><mx:Label text="co2" width="90" x="0" y="780" textAlign="right" fontStyle="normal" styleName="smallLabel"/><mx:TextInput id="prod_co2" y="780" name="co2" left="90" right="10" styleName="regularInput"/><mx:Label text="house" x="0" y="810" styleName="mediumAndBold"/><mx:Label text="foh position" width="80" x="0" y="830" textAlign="right" styleName="smallLabel"/><mx:TextInput id="prod_foh_position" name="fohPosition" y="830" left="90" right="10" styleName="regularInput"/><mx:Label text="snake run" width="80" x="0" y="850" textAlign="right" styleName="smallLabel"/><mx:TextInput id="prod_snake_run" name="snakeRun" y="850" left="90" right="10" styleName="regularInput"/><mx:Label text="barricade" width="80" x="0" y="870" textAlign="right" styleName="smallLabel"/><mx:TextInput id="prod_barricade" name="barricade" y="870" left="90" right="10" styleName="regularInput"/><mx:Label text="roof" width="80" x="0" y="890" textAlign="right" styleName="smallLabel"/><mx:TextInput id="prod_roof" name="roof" y="890" left="90" right="10" styleName="regularInput"/><mx:Label text="spots" width="80" x="0" y="910" textAlign="right" styleName="smallLabel"/><mx:TextInput id="prod_spots" name="spots" y="910" left="90" right="10" styleName="regularInput"/><mx:Label text="venue seats" width="80" x="0" y="930" textAlign="right" styleName="smallLabel"/>' ||
     '<mx:TextInput id="prod_venue_seats" name="venueSeats" y="930" left="90" right="10" styleName="regularInput"/></mx:Canvas>',
  '<?xml version="1.0" encoding="utf-8"?><mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:genui="com.pcguild.genui.containers.*" width="100%" xmlns:components="com.pcguild.genui.components.*"><mx:Label text="facility" x="0" y="15" textAlign="right" styleName="mediumAndBold"/><mx:Label text="dressing rooms" width="120" x="0" y="35" textAlign="right" styleName="smallLabel"/><mx:TextInput id="facilities_dressing_rooms" name="dressingRooms" y="35" left="125" right="10" styleName="regularInput"/><mx:Label text="notes" width="120" x="0" y="55" textAlign="right" styleName="smallLabel"/><mx:TextInput id="notes_dressing_room_notes" name="facilityNotes" y="55" left="125" right="10" styleName="regularInput"/><mx:Label text="offices" width="120" x="0" y="75" textAlign="right" styleName="smallLabel"/><mx:TextInput id="facilities_offices" name="offices" y="75" left="125" right="10" styleName="regularInput"/><mx:Label text="catering location" width="120" x="0" y="95" textAlign="right" styleName="smallLabel"/><mx:TextInput id="facilities_catering_location" name="cateringLocale" y="95" left="125" right="10" styleName="regularInput"/><mx:Label text="rehearsal space" width="120" x="0" y="115" textAlign="right" styleName="smallLabel"/><mx:TextInput id="facilities_rehearsal_space" name="rehearsalSpace" y="115" left="125" right="10" styleName="regularInput"/><mx:Label text="showers" width="120" x="0" y="135" textAlign="right" styleName="smallLabel"/><mx:TextInput id="facilities_showers" y="135" name="showers" left="125" right="10" styleName="regularInput"/><mx:Label text="security" width="120" x="0" y="155" textAlign="right" styleName="smallLabel"/><mx:TextInput id="facilities_security" name="security" y="155" left="125" right="10" styleName="regularInput"/><mx:Label text="merchandisers" width="120" x="0" y="175"textAlign="right" styleName="smallLabel"/><mx:TextInput id="facilities_merchandisers" name="merchandisers" y="175" left="125" right="10" styleName="regularInput"/><mx:Label text="hall merch %" width="120" x="0" y="195" textAlign="right" styleName="smallLabel"/><mx:TextInput id="facilities_hall_merch_percent" name="hallMerchPercent" y="195" left="125" right="10" styleName="regularInput"/><mx:Label text="towels" width="120" x="0" y="215" textAlign="right" styleName="smallLabel"/><mx:TextInput id="facilities_towels" name="towels" y="215" left="125" right="10" styleName="regularInput"/><mx:Label text="laundry" width="120" x="0" y="235" textAlign="right" styleName="smallLabel"/><mx:TextInput id="facilities_laundry" name="laundry" y="235" left="125" right="10" styleName="regularInput"/><mx:Label text="runners" width="120" x="0" y="255" textAlign="right" styleName="smallLabel"/><mx:TextInput id="facilities_runners" name="runners" y="255" left="125" right="10" styleName="regularInput"/><mx:Label text="parking" x="0" y="285" styleName="mediumAndBold"/><mx:Label text="truck parking" width="120" x="0" y="305" textAlign="right" styleName="smallLabel"/><mx:TextInput id="facilities_truck_parking" name="truckParking"y="305" left="125" right="10" styleName="regularInput"/><mx:Label text="bus parking" width="120" x="0" y="325" textAlign="right" styleName="smallLabel"/><mx:TextInput id="facilities_bus_parking" name="busParking"y="325" left="125" right="10" styleName="regularInput"/><mx:Label text="shore power" width="120" x="0" y="345" textAlign="right" styleName="smallLabel"/><mx:TextInput id="facilities_shore_power" name="shorePower"y="345" left="125" right="10" styleName="regularInput"/><mx:Label text="guest parking" width="120" x="0" y="365" textAlign="right" styleName="smallLabel"/><mx:TextInput id="facilities_guest_parking" name="guestParking"y="365" left="125" right="10" styleName="regularInput"/><mx:Label text="comments" width="120" x="0" y="385" textAlign="right" styleName="smallLabel"/><mx:TextInput id="notes_parking_comments" y="385" name="parkingComments"height="40" left="125" right="10" styleName="regularInput"/><mx:Label text="information tech" x="0" y="433" styleName="mediumAndBold"/><mx:Label text="circuit" width="120" x="0" y="453" textAlign="right" styleName="smallLabel"/><mx:TextInput id="facilities_circuit" name="circuit" width="250" y="453" left="125" styleName="regularInput"/><mx:Label text="ip" ' ||
     'width="120" x="0" y="473"textAlign="right" styleName="smallLabel"/><mx:TextInput id="facilities_ip" name="ip" width="250" y="473" left="125" styleName="regularInput"/><mx:Label text="wan ip" width="120" x="0" y="493" textAlign="right" styleName="smallLabel"/><mx:TextInput id="facilities_wan_ip" name="wanIP" width="250" y="493" left="125" styleName="regularInput"/><mx:Label text="subnet mask" width="120" x="0" y="513" textAlign="right" styleName="smallLabel"/><mx:TextInput id="facilities_subnet_mask" name="subnetMask" width="250" y="513" left="125" styleName="regularInput"/><mx:Label text="gateway" width="120" x="0" y="533" textAlign="right" styleName="smallLabel"/><mx:TextInput id="facilities_gateway" name="gateway" width="250" y="533" left="125" styleName="regularInput"/><mx:Label text="dns" width="120" x="0" y="553" textAlign="right" styleName="smallLabel"/><mx:TextInput id="facilities_dns" name="dns" width="250" y="553" left="125" styleName="regularInput"/><mx:Label text="username" width="108" x="364" y="453" textAlign="right" styleName="smallLabel"/><mx:TextInput id="facilities_username" name="username" y="453" left="479" right="10" styleName="regularInput"/><mx:Label text="password" width="108" x="364" y="473" textAlign="right" styleName="smallLabel"/><mx:TextInput id="facilities_password" name="password" y="473" left="479" right="10" styleName="regularInput"/><mx:Label text="isp" width="108" x="364" y="493" textAlign="right" styleName="smallLabel"/><mx:TextInput id="facilities_isp" name="isp" y="493" left="479" right="10" styleName="regularInput"/><mx:Label text="fees" width="108" x="364" y="513" textAlign="right" styleName="smallLabel"/><mx:TextInput id="facilities_fees" name="fees" y="513" left="479" right="10" styleName="regularInput"/><mx:Label text="comments" width="108" x="364" y="533" textAlign="right" styleName="smallLabel"/><mx:TextInput id="notes_office_it_comments" name="officeComments" y="533" height="42" left="479" right="10" styleName="regularInput"/></mx:Canvas>',
  '<?xml version="1.0" encoding="utf-8"?><mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" xmlns:genui="com.pcguild.genui.containers.*" xmlns:components="com.pcguild.genui.components.*"><mx:Label text="audio" width="120" x="0" y="34"textAlign="right" styleName="smallLabel"/><mx:TextInput id="equipment_audio" name="audio" y="34" height="50" left="125" right="10" styleName="regularInput"/><mx:Label text="audio comments" width="120" x="0" y="94"textAlign="right" styleName="smallLabel"/><mx:TextInput id="notes_audio_comments" name="audioComments" y="94" height="50" left="125" right="10" styleName="regularInput"/><mx:Label text="staging / risers" width="120" x="0" y="154"textAlign="right" styleName="smallLabel"/><mx:TextInput id="equipment_staging" name="staging" y="154" height="50" left="125" right="10" styleName="regularInput"/><mx:Label text="lighting" width="120" x="0" y="214"textAlign="right" styleName="smallLabel"/><mx:TextInput id="equipment_lighting" name="lighting" y="214" height="50" left="125" right="10" styleName="regularInput"/><mx:Label text="lighting comments" width="120" x="0" y="274" textAlign="right" styleName="smallLabel"/><mx:TextInput id="notes_lighting_comments" name="lightComments" y="274" height="50" left="125" right="10" styleName="regularInput"/><mx:Label text="backline" width="120" x="0" y="334"textAlign="right" styleName="smallLabel"/><mx:TextInput id="equipment_backline" name="backline" y="334" height="50" left="125" right="10" styleName="regularInput"/><mx:Label text="video" width="120" x="0" y="392"textAlign="right" styleName="smallLabel"/><mx:TextInput id="equipment_video" name="video" y="392" height="50" left="125" right="10" styleName="regularInput"/><mx:Label text="video comments" width="120" x="0" y="452"textAlign="right" styleName="smallLabel"/><mx:TextInput id="notes_video_comments" name="videoComments" y="452" height="50" left="125" right="10" styleName="regularInput"/><mx:Label text="other" width="120" x="0" y="512"textAlign="right" styleName="smallLabel"/><mx:TextInput id="equipment_other" name="other" y="512" height="50" left="125" right="10" styleName="regularInput"/></mx:Canvas>',  
  '<?xml version="1.0" encoding="utf-8"?><mx:Canvas xmlns:mx   = "http://www.adobe.com/2006/mxml"xmlns:genui="com.pcguild.genui.containers.*" xmlns:components="com.pcguild.genui.containers.*" width="100%" xmlns:components="com.pcguild.genui.components.*"><components:XMLContactGrid id="localCrewContacts" name="localCrewContacts" left="340" right="10" top="10" height="125" /><mx:Label text="local union" width="100" x="10" y="10"textAlign="right" styleName="smallLabel"/><mx:TextInput id="venue_crew_venue_union" name="localUnion" width="190" x="115" y="10" styleName="regularInput"/><mx:Label text="minimum IN" width="100" x="10" y="40"textAlign="right" styleName="smallLabel"/><mx:TextInput id="venue_crew_minimum_in" name="minimumIN" width="190" x="115" y="40" styleName="regularInput"/><mx:Label text="minimum OUT" width="100" x="10" y="70"textAlign="right" styleName="smallLabel"/><mx:TextInput id="venue_crew_minimum_out" name="minimumOUT" width="190" x="115" y="70" styleName="regularInput"/><mx:Label text="penalties" width="100" x="10" y="100"textAlign="right" styleName="smallLabel"/><mx:TextInput id="venue_crew_meal_penalty_after" name="penalties" x="115" y="100" width="190" styleName="regularInput"/><mx:Label text="crew comments" width="100" x="10" y="168"textAlign="right" styleName="smallLabel"/><mx:TextInput id="notes_crew_comments" name="crewComments" y="167" height="75" left="115" right="10" styleName="regularInput"/></mx:Canvas>',
  '<?xml version="1.0" encoding="utf-8"?><mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" xmlns:genui="com.pcguild.genui.containers.*" xmlns:components="com.pcguild.genui.components.*"><mx:Label text="airport notes" width="108" x="0" y="10"textAlign="right" styleName="smallLabel"/><mx:TextInput id="logistics_airport" name="airportNotes" y="10" height="50" left="115" right="10" styleName="regularInput"/><mx:Label text="ground transport" width="108" x="0" y="70"textAlign="right" styleName="smallLabel"/><mx:TextInput id="logistics_ground_transport" name="groundTransport" y="70" height="50" left="115" right="10" styleName="regularInput"/><mx:Label text="area businesses" width="108" x="0" y="130"textAlign="right" styleName="smallLabel"/><mx:TextInput id="logistics_area_business" name="areaBusiness" y="130" height="50" left="115" right="10" styleName="regularInput"/><mx:Label text="area restaurants" width="108" x="0" y="188"textAlign="right" styleName="smallLabel"/><mx:TextInput id="logistics_area_restaurants" name="areaRestaurants" y="188" height="50" left="115" right="10" styleName="regularInput"/><mx:Label text="points of interest" width="108" x="0" y="248"textAlign="right" styleName="smallLabel"/><mx:TextInput id="logistics_interest" name="interest" y="248" height="50" left="115" right="10" styleName="regularInput"/><mx:Label text="closest cities" width="108" x="0" y="308"textAlign="right" styleName="smallLabel"/><mx:TextInput id="logistics_closest_cities" name="closestCity" y="308" height="50" left="115" right="10" styleName="regularInput"/><mx:Label text="directions" width="107" x="0" y="370" textAlign="right" styleName="smallLabel"/><mx:TextInput id="logistics_directions" name="directions" y="368" height="250" left="115" right="10" styleName="regularInput"/></mx:Canvas>',
  STRFTIME('%J','2009-01-01 01:01:01'), '0', STRFTIME('%J','2009-01-01 01:01:01'), '0', '0', STRFTIME('%J','2009-01-01 01:01:01'), '', 0);

insert into venue_type values (
  'Nightclub',
  'Small nightclub venue',
  '<mx:MXML xmlns:mx="http://www.adobe.com/2006/mxml"><mx:Label text="Sample Field" x="0" y="0" /><mx:TextInput id="sampleField" name="sampleField" text="" x="80" y="0" /></mx:MXML>',
  '<mx:MXML xmlns:mx="http://www.adobe.com/2006/mxml"><mx:Label text="Sample Field" x="0" y="0" /><mx:TextInput id="sampleField" name="sampleField" text="" x="80" y="0" /></mx:MXML>',
  '<mx:MXML xmlns:mx="http://www.adobe.com/2006/mxml"><mx:Label text="Sample Field" x="0" y="0" /><mx:TextInput id="sampleField" name="sampleField" text="" x="80" y="0" /></mx:MXML>',
  '<mx:MXML xmlns:mx="http://www.adobe.com/2006/mxml"><mx:Label text="Sample Field" x="0" y="0" /><mx:TextInput id="sampleField" name="sampleField" text="" x="80" y="0" /></mx:MXML>',
  '<mx:MXML xmlns:mx="http://www.adobe.com/2006/mxml"><mx:Label text="Sample Field" x="0" y="0" /><mx:TextInput id="sampleField" name="sampleField" text="" x="80" y="0" /></mx:MXML>',
  STRFTIME('%J','2009-01-01 01:01:01'), '0', STRFTIME('%J','2009-01-01 01:01:01'), '0', '0', STRFTIME('%J','2009-01-01 01:01:01'), '', 0);
  
insert into venue_type values (
  'Festival',
  'Festival venue',
  '<mx:MXML xmlns:mx="http://www.adobe.com/2006/mxml"><mx:Label text="Sample Field" x="0" y="0" /><mx:TextInput id="sampleField" name="sampleField" text="" x="80" y="0" /></mx:MXML>',
  '<mx:MXML xmlns:mx="http://www.adobe.com/2006/mxml"><mx:Label text="Sample Field" x="0" y="0" /><mx:TextInput id="sampleField" name="sampleField" text="" x="80" y="0" /></mx:MXML>',
  '<mx:MXML xmlns:mx="http://www.adobe.com/2006/mxml"><mx:Label text="Sample Field" x="0" y="0" /><mx:TextInput id="sampleField" name="sampleField" text="" x="80" y="0" /></mx:MXML>',
  '<mx:MXML xmlns:mx="http://www.adobe.com/2006/mxml"><mx:Label text="Sample Field" x="0" y="0" /><mx:TextInput id="sampleField" name="sampleField" text="" x="80" y="0" /></mx:MXML>',
  '<mx:MXML xmlns:mx="http://www.adobe.com/2006/mxml"><mx:Label text="Sample Field" x="0" y="0" /><mx:TextInput id="sampleField" name="sampleField" text="" x="80" y="0" /></mx:MXML>',
  STRFTIME('%J','2009-01-01 01:01:01'), '0', STRFTIME('%J','2009-01-01 01:01:01'), '0', '0', STRFTIME('%J','2009-01-01 01:01:01'), '', 0);

-- ##### venue #####  --;

INSERT INTO 'venue' ('v_id','v_parent_venue_id','v_mtn_id','v_organization_id','v_is_linked','v_name','v_previous_names','v_address_line_1','v_address_line_2','v_city','v_state','v_zip','v_country','v_lat_long','v_google_map_query','v_time_zone','v_primary_url','v_primary_email','v_secondary_email','v_capacity','v_venue_type_id','v_age_requirement','v_phone_xml','v_public_notes','v_private_notes','v_production_xml','v_facilities_xml','v_equipment_xml','v_local_crew_xml','v_local_crew_call_xml','v_logistics_xml','v_created_date','v_created_by','v_modified_date','v_modified_by','v_sync_id','v_sync_date','v_sync_checksum','v_is_deleted') VALUES 
 ('0','0','0','0',0,'No Venue Selected','','','','','','','','','','','','','',0,'Arena','','','Default venue required by system','','','','','','','',STRFTIME('%J','2009-01-01 01:01:01'),'0',STRFTIME('%J','2009-01-01 01:01:01'),'0',0,STRFTIME('%J','2009-01-01 01:01:01'),'',0);

-- ##### day #####  --;

INSERT INTO 'day' ('d_id','d_tour_id','d_name','d_day_date','d_day_type','d_general_notes','d_travel_notes','d_hotel_notes','d_city','d_state','d_zipcode','d_lat_long','d_google_map_query','d_time_zone','d_created_date','d_created_by','d_modified_date','d_modified_by','d_sync_id','d_sync_date','d_sync_checksum','d_is_deleted') VALUES 
 ('0','0','No Day Selected',STRFTIME('%J','2009-01-01 01:01:01'),'Empty','Default day required by system','','','','','','','','',STRFTIME('%J','2009-01-01 01:01:01'),'0',STRFTIME('%J','2009-01-01 01:01:01'),'0',0,STRFTIME('%J','2009-01-01 01:01:01'),'',0);

-- ##### day_event #####  --;

INSERT INTO 'day_event' ('de_id','de_day_id','de_promoter_id','de_venue_id','de_name','de_created_date','de_created_by','de_modified_date','de_modified_by','de_sync_id','de_sync_date','de_sync_checksum','de_is_deleted') VALUES 
 ('0','0','0','0','No Event Selected',STRFTIME('%J','2009-01-01 01:01:01'),'0',STRFTIME('%J','2009-01-01 01:01:01'),'0',0,STRFTIME('%J','2009-01-01 01:01:01'),'',0);

-- ##### hotel_type #####  --;

INSERT INTO 'hotel_type' ('ht_id','ht_description','ht_facilities_def_xml','ht_custom_fields_def_xml','ht_created_date','ht_created_by','ht_modified_date','ht_modified_by','ht_sync_id','ht_sync_date','ht_sync_checksum','ht_is_deleted') VALUES  ('Hotel','Standard Hotel','<mx:MXML xmlns:mx="http://www.adobe.com/2006/mxml"><mx:Label text="Sample Field" x="0" y="0" /><mx:TextInput id="sampleField" name="sampleField" text="" x="80" y="0" /></mx:MXML>','<mx:MXML xmlns:mx="http://www.adobe.com/2006/mxml"><mx:Label text="Sample Field" x="0" y="0" /><mx:TextInput id="sampleField" name="sampleField" text="" x="80" y="0" /></mx:MXML>',STRFTIME('%J','2009-01-01 01:01:01'),'0',STRFTIME('%J','2009-01-01 01:01:01'),'0',0,STRFTIME('%J','2009-01-01 01:01:01'),'',0);

-- ##### hotel #####  --;

INSERT INTO 'hotel' ('h_id','h_hotel_type_id','h_mtn_id','h_organization_id','h_parent_hotel_id','h_is_linked','h_name','h_address_line_1','h_address_line_2','h_city','h_state','h_zip','h_country','h_lat_long','h_google_map_query','h_time_zone','h_phone_xml','h_checkin_time','h_checkout_time','h_miles_to_airport','h_facilities_xml','h_notes','h_custom_fields_xml','h_created_date','h_created_by','h_modified_date','h_modified_by','h_sync_id','h_sync_date','h_sync_checksum','h_is_deleted') VALUES 
 ('0','Hotel','0','0','0',0,'No Hotel Selected','','','','','','','','','','','2008-01-01 01:01:01','2008-01-01 01:01:01',0,'','Default hotel required by system','','2008-01-01 01:01:01','0','2008-01-01 01:01:01','0',0,'2008-01-01 01:01:01','',0);

-- ##### travel_type #####  --;

INSERT INTO 'travel_type' ('tt_id','tt_description','tt_custom_fields_def_xml','tt_created_date','tt_created_by','tt_modified_date','tt_modified_by','tt_sync_id','tt_sync_date','tt_sync_checksum','tt_is_deleted') VALUES 
 ('Air','Air Transportation','<mx:MXML xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:genui = "com.pcguild.genui.containers.*"xmlns:components="com.pcguild.genui.components.*"><mx:Label text="Ticket Price" width="77" x="566" y="180" textAlign="left" styleName="smallLabel"/><mx:Label text="Ticket Status" width="88" x="350" y="180" textAlign="left" styleName="smallLabel"/><mx:Label text="Ground Transportation Notes" width="172" x="10" y="128" textAlign="left" styleName="smallLabel"/><mx:TextInput id="travel_party5" text="XX" y="178" width="96" x="647"/><mx:ComboBox id="ticketStatusl" name="ticketStatus" x="435" y="178" dataProvider="[''Confirmed'',''Unconfirmed'']"></mx:ComboBox><mx:TextArea id="groundTransport" name="groundTransport" x="10" y="156" width="283"/><components:XMLFlightTravelGrid id="flightLegs" name="flightLegs" top="5" left="5" right="5" height="100"/></mx:MXML>',STRFTIME('%J','2009-01-01 01:01:01'),'0',STRFTIME('%J','2009-01-01 01:01:01'),'0',0,STRFTIME('%J','2009-01-01 01:01:01'),'',0);
 
INSERT INTO 'travel_type' ('tt_id','tt_description','tt_custom_fields_def_xml','tt_created_date','tt_created_by','tt_modified_date','tt_modified_by','tt_sync_id','tt_sync_date','tt_sync_checksum','tt_is_deleted') VALUES ('Ground','Ground Transportation','<mx:MXML xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:genui = "com.pcguild.genui.containers.*"xmlns:components="com.pcguild.genui.components.*"><mx:Label text="TODO: Ground Transport Template"/></mx:MXML>',STRFTIME('%J','2009-01-01 01:01:01'),'0',STRFTIME('%J','2009-01-01 01:01:01'),'0',0,STRFTIME('%J','2009-01-01 01:01:01'),'',0);
 
INSERT INTO 'travel_type' ('tt_id','tt_description','tt_custom_fields_def_xml','tt_created_date','tt_created_by','tt_modified_date','tt_modified_by','tt_sync_id','tt_sync_date','tt_sync_checksum','tt_is_deleted') VALUES ('Sea','Sea Transportation','<mx:MXML xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:genui = "com.pcguild.genui.containers.*"xmlns:components="com.pcguild.genui.components.*"><mx:Label text="TODO: Sea Transport Template"/></mx:MXML>',STRFTIME('%J','2009-01-01 01:01:01'),'o',STRFTIME('%J','2009-01-01 01:01:01'),'0',0,STRFTIME('%J','2009-01-01 01:01:01'),'',0);

-- ##### schedule_item_type #####  --;

INSERT INTO 'schedule_item_type' ('sit_id','sit_is_travel','sit_description','sit_custom_fields_def_xml','sit_created_date','sit_created_by','sit_modified_date','sit_modified_by','sit_sync_id','sit_sync_date','sit_sync_checksum','sit_is_deleted') VALUES  ('Item',0,'Schedule Item','<mx:MXML xmlns:mx="http://www.adobe.com/2006/mxml"><mx:Label text="Sample Field" x="0" y="0" /><mx:TextInput id="sampleField" name="sampleField" text="" x="80" y="0" /></mx:MXML>',STRFTIME('%J','2009-01-01 01:01:01'),'0',STRFTIME('%J','2009-01-01 01:01:01'),'0',0,STRFTIME('%J','2009-01-01 01:01:01'),'',0);INSERT INTO 'schedule_item_type' ('sit_id','sit_is_travel','sit_description','sit_custom_fields_def_xml','sit_created_date','sit_created_by','sit_modified_date','sit_modified_by','sit_sync_id','sit_sync_date','sit_sync_checksum','sit_is_deleted') VALUES  ('Publicity',0,'Publicity Item','<mx:MXML xmlns:mx="http://www.adobe.com/2006/mxml"><mx:Label text="Sample Field" x="0" y="0" /><mx:TextInput id="sampleField" name="sampleField" text="" x="80" y="0" /></mx:MXML>',STRFTIME('%J','2009-01-01 01:01:01'),'0',STRFTIME('%J','2009-01-01 01:01:01'),'0',0,STRFTIME('%J','2009-01-01 01:01:01'),'',0);INSERT INTO 'schedule_item_type' ('sit_id','sit_is_travel','sit_description','sit_custom_fields_def_xml','sit_created_date','sit_created_by','sit_modified_date','sit_modified_by','sit_sync_id','sit_sync_date','sit_sync_checksum','sit_is_deleted') VALUES  ('Travel',1,'Travel Schedule Item','<mx:MXML xmlns:mx="http://www.adobe.com/2006/mxml"><mx:Label text="Sample Field" x="0" y="0" /><mx:TextInput id="sampleField" name="sampleField" text="" x="80" y="0" /></mx:MXML>',STRFTIME('%J','2009-01-01 01:01:01'),'0',STRFTIME('%J','2009-01-01 01:01:01'),'0',0,STRFTIME('%J','2009-01-01 01:01:01'),'',0);
  
  
-- ##### IMPORTANT - REPLACE WITH NEW SCHEMA VERSION NUMBER ##### --;

insert into 'system' values ('schema_version','1021');
